package thread;

import com.sun.imageio.plugins.jpeg.JPEGStreamMetadataFormat;

/**
 * demo02
 *
 * @author dingwen
 * @date 2021/09/05
 */
public class Demo02 implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 200; i++) {
            System.out.println("新启线程第" + i + "次执行");
        }
    }

    public static void main(String[] args) {
        new Thread(new Demo02()).start();
        for (int i = 0; i < 2000; i++) {
            System.out.println("main线程第" + i + "次执行");
        }
        // 两个线程交替执行
    }
}
